package com.jushu.storbox.entities;

public enum FileType {
	Folder(0),File(1),Unknow(-1);
	
	public final static int FOLDER_TYPE_VALUE = 0;
	public final static int FILE_TYPE_VALUE = 1;
	
	private int value = 0;
	
	private FileType(int value){
		this.value = value;
	}
	
	public int value() {
        return this.value;
    }
	
	public FileType getFileType(int value) {
		switch(value) {
			case FOLDER_TYPE_VALUE:
				return Folder;
				
			case FILE_TYPE_VALUE:
				return File;
				
			default:
				return Unknow;
		}
	}
}
